<template>
  <div class="newsBox">
      <TopBar></TopBar>
      <div class="container">
        <h2 v-text="item.title"></h2>
        <div v-html="item.content.replace(/\r\n/g, '<br/>')" class="content"></div>
        <img :src="item.img" v-if="item.img">
        <video :src="item.video" controls preload="auto" v-if="item.video"></video>
        <audio :src="item.audio" controls preload="auto" v-if="item.audio"></audio>
      </div>
  </div>
</template>
<script>
//import {getSDK} from '../../../service/wxShare.js'//非组件需要添加wxshare.js
import TopBar from '../../component/common/TopBar'

export default {
  components:{
    TopBar
  },
  data(){
    return {
      item:this.$route.params.item
    }
  }
}
</script>
<style lang="less">
  @import '../../../style/mixin.less';

  .container{
    padding: 1.3rem .6rem;
    .content{
      .sc(0.4267rem,#999);
    }
    img{
      .wh(100%,100%)
    }
    video{
      width: 100%;
      height: 4rem;
    }
  }
</style>
